import { defineStore } from "pinia";
// 使用持久化插件
// import piniaPluginPersist from 'pinia-plugin-persist'
import getters from "./getter";
import actions from "./actions";
import user from "./model/user";
import system from "./model/system";
const storeData: any = {
    user, // 用户信息
    system,
};
export const useStore: any = defineStore("app", {
    state: () => {
        return {
            user, // 用户信息
            system,
        };
    },
    getters,
    persist: {
        key: "AppStore", //存储名称
        storage: sessionStorage, // 存储方式
        //指定 state 中哪些数据需要被持久化。[] 表示不持久化任何状态，undefined 或 null 表示持久化整个 state
        pick: ["system", "user"],
    },
});
